package com.kexin.common.interceptor;




import com.kexin.common.exception.WebException;
import com.kexin.common.numeration.ExceptionEnum;
import com.kexin.common.user.service.IUserBaseService;
import com.kexin.common.utils.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * app登录拦截
 * @author chen
 * @date 2020/4/13
 */

@Component
public class AppLoginInterceptor implements HandlerInterceptor {

    @Autowired
    IUserBaseService userBaseService;
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        userBaseService.checkLogin(request);
        return true;
    }
}
